#ifndef _ARC_LOG_SYSTEM_H_
#define _ARC_LOG_SYSTEM_H_

#ifdef LOG_API_EXPORT
	#define	LOG_API	__declspec(dllexport)
#else
	#define LOG_API	__declspec(dllimport)
#endif

#if defined(__cplusplus)
extern "C" {
#endif
		
	// const log level define 
	static const int LEVEL_NOTEST	= 800;	
	static const int LEVEL_DEBUG	= 700;
	static const int LEVEL_INFO		= 600;
	static const int LEVEL_NOTICE	= 500;
	static const int LEVEL_WARN		= 400;
	static const int LEVEL_ERROR	= 300;
	static const int LEVEL_CRIT		= 200;
	static const int LEVEL_ALERT	= 100;
	static const int LEVEL_FATAL	= 0;
	static const int LEVEL_EMERG	= 0;

	LOG_API	bool ArcInitializeLogSystemA(const char* config);
	LOG_API	bool ArcInitializeLogSystemW(const wchar_t* config);
	LOG_API	void ArcUnInitializeLogSystem();
	LOG_API void ArcLogA(int level, const char* fmt, ...);
	LOG_API	void ArcLogW(int level, const wchar_t* fmt, ...);
	LOG_API void ArcCategoryLogA(int level, const char* category, const char* fmt, ...);
	LOG_API void ArcCategoryLogW(int level, const wchar_t* category, const wchar_t* fmt, ...);
	LOG_API int	 ArcLogGetErrorMessageW(wchar_t* errorMsgBuffer, int messageLen);
	LOG_API int  ArcLogGetErrorMessageA(char* errorMsgBuffer, int messageLen);

	// NDC Diagnosis foundation
	LOG_API void ArcLogNDCPushA(const char* ndcmessage);
	LOG_API void ArcLogNDCPushW(const wchar_t* ndcmessage);
	LOG_API void ArcLogNDCPop();

#ifdef UNICODE
	#define ArcInitializeLogSystem	ArcInitializeLogSystemW
	#define ArcLog	ArcLogW	
	#define ArcCategoryLog ArcCategoryLogW
	#define ArcLogGetErrorMessage ArcLogGetErrorMessageW
	#define ArcLogNDCPush ArcLogNDCPushW
#else
	#define ArcInitializeLogSystem	ArcInitializeLogSystemA
	#define ArcLog	ArcLogA	
	#define ArcCategoryLog ArcCategoryLogA
	#define ArcLogGetErrorMessage ArcLogGetErrorMessageA
	#define ArcLogNDCPush ArcLogNDCPushA
#endif

#if defined(__cplusplus)
}
#endif

#endif